package cn.demoncat.util.es.constant;

/**
 * ElasticSearch 常量
 * 
 * @author 延晓磊
 *
 * @since 2020-9-3
 */
public class EsConstant {

	/**
	 * Document.id
	 */
	public static final String ID_FIELD = "_id";
	
	/**
	 * POJO.id
	 */
	public static final String ID_ATTR = "id";
	
	/**
	 * 高亮标签
	 */
	public static final String HLT_PRE_TAG = "<span class=\"search-highlight\">";
	/**
	 * 高亮标签
	 */
	public static final String HLT_POST_TAG = "</span>";
	/**
	 * 滚动查询的默认缓存时间 - 秒
	 */
	public static final long SCROLL_SECOND = 600;
	
	/**
	 * 默认的聚合名称
	 */
	public static final String AGG_NAME = "agg";
	
	/**
	 * 搜索建议的词条数
	 */
	public static final int SUGGEST_SIZE = 10;
	/**
	 * 搜索建议的词条长度
	 */
	public static final int SUGGEST_MIN_LEN = 2;
	/**
	 * 搜索建议数词条长度
	 */
	public static final int SUGGEST_MAX_LEN = 20;
	
}
